//
//  MCNNavTitleLabel.swift
//  MCNNavTitleLabel
//
//  Created by yhbj on 2021/9/16.
//

import UIKit

class MCNNavTitleLabel: UILabel {
    var mcn_titleLabelFrameUpdateBlock:((_ titleLabel: MCNNavTitleLabel)->())?
    
    override var text: String? {
        didSet {
            noticeUpdateFrame()
        }
    }
    
    override var attributedText: NSAttributedString? {
        didSet {
            noticeUpdateFrame()
        }
    }
    
    override var font: UIFont! {
        didSet {
            noticeUpdateFrame()
        }
    }
    
    private func noticeUpdateFrame() {
        if mcn_titleLabelFrameUpdateBlock != nil {
            mcn_titleLabelFrameUpdateBlock!(self)
        }
    }
}
